/**
 * Author(s): xuming.Wong <xuming.Wong@gmail.com>
 */

#ifndef __QS_HttpDayTransactionQuery_H__
#define __QS_HttpDayTransactionQuery_H__

#include "Prerequisites.h"

#include <QtNetwork/QNetworkRequest>
#include <QtNetwork/QNetworkAccessManager>

#include "Transaction.h"

namespace QSThink
{
	class HttpDayTransactionQuery: public QObject
	{
		Q_OBJECT
	public:
		HttpDayTransactionQuery(int day,int symbol);
	public slots:
		
		bool replyFinished(QNetworkReply* reply );
		bool onReadyRead();
		QString buildQueryUrl( int day, int symbol );
		Transaction1Day* getDayTransaction();

		bool dataReaded()
		{
			return _dataReaded;
		}

	protected:
		QNetworkAccessManager _netAccessMgr;
		int _day;
		int _symbol;
		Transaction1Day* _dayTrans;

		bool _received;//data received

		bool _dataReaded;


	};

}

#endif
